import server from "@/util/request.js"

export function addUserAddress(data) {
  return server({
    url: "/useraddress/addUserAddress",
    method: "POST",
    data
  })
}

export function findUserAddress(userId) {
  return server({
    url: `/useraddress/${userId}`,
    method: "GET",
  })
}
export function updateUserAddress(data) {
  return server({
    url: "/useraddress/updateUserAddress",
    method: "POST",
    data
  })
}

export function deleteUserAddress(addressId) {
  return server({
    url: `/useraddress/${addressId}`,
    method: "DELETE",
  })
}